package com.kh.samr.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

/**
 * 失信黑名单
 *
 * @author Harry
 * @date 2020/12/14
 */
@EqualsAndHashCode(callSuper = true)
@Table(name = "dishonesty")
@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Dishonesty extends BaseEntity {
	
	private static final long serialVersionUID = -3004595365272617318L;
	
	/**
	 * 企业名称
	 */
	@Column(nullable = false)
	private String enterpriseName;
	
	/**
	 * 统一社会信用代码
	 */
	@Column(length = 18, nullable = false)
	private String uniformSocialCreditCode;
	
	/**
	 * 名单名称
	 */
	@Column(length = 100, nullable = false)
	private String listName;
	
	/**
	 * 列入原因
	 */
	@Column(length = 512, nullable = false)
	private String includedReasons;
	
	/**
	 * 列入时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd", locale = "zh", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@Temporal(TemporalType.DATE)
	@Column(nullable = false)
	private Date includedTime;
	
	/**
	 * 列入部门
	 */
	@Column(nullable = false)
	private String includedDepartment;
}
